home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / jed10.zip / EAT.ASM < prev    next >
Assembly Source File  |  1993-02-26  |  2KB  |  70 lines

  1. ;---------------------------------------------------------------
  2. ;                             EAT.ASM
  3. ;                Backhanded advertising program
  4. ;
  5. ;                                      by Jeff Duntemann
  6. ;                                      MASM/TASM
  7. ;                                      Last update 3/5/89
  8. ;---------------------------------------------------------------
  9.  
  10. ;----------------------------|
  11. ;    BEGIN STACK SEGMENT     |
  12. ;----------------------------|
  13. MyStack    SEGMENT STACK        ; STACK word ensures loading of SS by DOS
  14.  
  15.            DB      64 DUP ('STACK!!!') ; This reserves 512 bytes for the stack
  16.  
  17. MyStack    ENDS
  18. ;----------------------------|
  19. ;     END STACK SEGMENT      |
  20. ;----------------------------|
  21.  
  22.  
  23. ;----------------------------|
  24. ;     BEGIN DATA SEGMENT     |
  25. ;----------------------------|
  26. MyData     SEGMENT
  27.  
  28. Eat1       DB      "Eat at Joe's...",'$'
  29. CRLF       DB      0DH,0AH,'$'
  30.  
  31. MyData     ENDS
  32. ;----------------------------|
  33. ;      END DATA SEGMENT      |
  34. ;----------------------------|
  35.  
  36. ;----------------------------|
  37. ;     BEGIN CODE SEGMENT     |
  38. ;----------------------------|
  39. MyProg     SEGMENT
  40.  
  41.            assume CS:MyProg,DS:MyData
  42. Main       PROC
  43.  
  44. Start:     ; This is where program execution begins:
  45.  
  46.            mov  AX,MyData   ; Set up our own data segment address in DS
  47.            mov  DS,AX       ; Can't load segment reg. directly from memory
  48.  
  49.            lea  DX,Eat1     ; Load offset of Eat1 message string into DX
  50.            mov  AH,09H      ; Select DOS service 09H: Print String
  51.            int  21H         ; Call DOS
  52.  
  53.            lea  DX,CRLF     ; Load offset of CRLF string into DX
  54.            mov  AH,09H      ; Select DOS service 09H: Print String
  55.            int  21H         ; Call DOS
  56.  
  57.            mov  AH,4CH      ; Terminate process DOS service
  58.            mov  AL,0        ; Pass this value back to ERRORLEVEL
  59.            int  21H         ; Control returns to DOS
  60.  
  61. Main       ENDP
  62.  
  63. MyProg     ENDS
  64.  
  65. ;----------------------------|
  66. ;      END CODE SEGMENT      |
  67. ;----------------------------|
  68.  
  69.            END Start
  70.